# encoding=utf-8
# author:梁子龙
from flask import Flask

from Shopping.resources.user import user_bp
from setting import map_config

def create_app(config_type):
    app =Flask(__name__)


    #
    app.config.from_object((map_config.get(config_type)))
    #日志处理
    #加载sqlalchemy
    from comment.models  import db
    db.init_app(app)
    #加载蓝图
    app.register_blueprint(user_bp)
    return  app
